package lc;

import ch2linkedlist.ListNode;

public class LinkedListCycle {
	public boolean findStart(ListNode head) {
		if (head == null || head.next == null || head.next.next == null) {
			return false;
		}
		
		ListNode r1 = head.next;
		ListNode r2 = head.next.next;
		while (r2.next != null && r1 != r2) {
			r1 = r1.next;
			if (r2.next.next == null) {
				return false;
			}
			r2 = r2.next.next;
		}

		if (r2.next == null) {
			return false;
		}
		else {
			return true;
		}
	}
}
